import java.util.Scanner;

public class Test3 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        int n = in.nextInt();
        int[][] ret = new int[n][n];
        for (int i = 0; i < n; i++) {
            for (int j = 0; j <= i; j++) {
                if (j == 0 || i == j) {
                    ret[i][j] = 1;
                } else {
                    ret[i][j] = ret[i-1][j-1] + ret[i-1][j];
                }
                for (int k = ("" + ret[i][j]).length(); k < 5; k++) {
                    System.out.print(" ");
                }
                System.out.print(ret[i][j]);
                if (i == j) {
                    System.out.println();
                }
            }
        }
    }
}
